package com.module.itemeditor
{
	import com.core.utils.StringUtil;

	public class PropertyFactory
	{
		public function PropertyFactory()
		{
		}
		
		public static function createProperty(name:String,value:Object):Object
		{
			var newobj:Object;
			if(StringUtil.mayBeNumber(String(value))){
				newobj = new IntegerProperty();
				newobj.name = name;
				newobj.value = int(value);
			}
			else
			{
				newobj = new StringProperty();
				newobj.name = name;
				newobj.value = String(value);
			}
			return newobj;
		}
	}
}